/***
 * $HeadURL: http://gstestbbs.googlecode.com/svn/trunk/sfmforum/src/main/java/com/sfmforum/core/mapper/GenericMapper.java $
 * 
 **/
package com.sfmforum.core.mapper;

import java.util.List;

/***
 * @author $Author: nathanliaogs@gmail.com $
 * @version $Revision: 24 $
 * @modified $Date: 2012-04-05 13:42:27 +0000 (Thu, 05 Apr 2012) $
 * 
 **/
public interface GenericMapper<T> {
	/**
	 * get entity with id
	 * 
	 * @param id
	 * @return
	 */
	public T get(Integer id);

	/**
	 * add an entity
	 * 
	 * @param t
	 */
	public void add(T t);

	/**
	 * update an entity
	 * 
	 * @param t
	 */
	public void update(T t);

	/**
	 * delete an entity
	 * 
	 * @param t
	 */
	public void delete(Integer id);

	/**
	 * get entities list
	 * 
	 * @return
	 */
	public List<T> getAll();

}
